/*******************************************************************************
 * Copyright (c) 2005, 2014 springside.github.io
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 *******************************************************************************/
package com.tyijian.admin.entity;

import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.springframework.context.annotation.Lazy;

/**
 * 开发团队.
 * 
 */
@Entity
@Table(name = "sys_team")
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class SysTeam extends IdEntity {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	
	private String name;
	private SysUser master;

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@NotNull
	@Lazy(false)
	@OneToOne
	@JoinColumn(name = "master_id")
	public SysUser getMaster() {
		return master;
	}

	public void setMaster(SysUser master) {
		this.master = master;
	}
}
